package com.springtest.static_factory;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class InstanceTest2 {
    public static void main (String[] args){
        String xmlpath="beans2.xml";
        ApplicationContext applicationContext= new ClassPathXmlApplicationContext(xmlpath);
        Bean2 bean2=(Bean2) applicationContext.getBean("bean2");
        System.out.println(bean2);
    }
}
